<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/src/gui/styles/qstyleoption.cpp -->
<head>
  <title>Qt 4.3: QStyleOptionToolBoxV2 Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QStyleOptionToolBoxV2 Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1>
<p>The QStyleOptionToolBoxV2 class is used to describe the parameters necessary for drawing a frame in Qt 4.3 or above. <a href="#details">More...</a></p>
<pre> #include &lt;QStyleOptionToolBoxV2&gt;</pre><p>Inherits <a href="qstyleoptiontoolbox.html">QStyleOptionToolBox</a>.</p>
<p>This class was introduced in Qt 4.3.</p>
<ul>
<li><a href="qstyleoptiontoolboxv2-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h3>Public Types</h3>
<ul>
<li><div class="fn"/>enum <b><a href="qstyleoptiontoolboxv2.html#SelectedPosition-enum">SelectedPosition</a></b> { NotAdjacent, NextIsSelected, PreviousIsSelected }</li>
<li><div class="fn"/>enum <b><a href="qstyleoptiontoolboxv2.html#StyleOptionVersion-enum">StyleOptionVersion</a></b> { Version }</li>
<li><div class="fn"/>enum <b><a href="qstyleoptiontoolboxv2.html#TabPosition-enum">TabPosition</a></b> { Beginning, Middle, End, OnlyOneTab }</li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"/><b><a href="qstyleoptiontoolboxv2.html#QStyleOptionToolBoxV2">QStyleOptionToolBoxV2</a></b> ()</li>
<li><div class="fn"/><b><a href="qstyleoptiontoolboxv2.html#QStyleOptionToolBoxV2-2">QStyleOptionToolBoxV2</a></b> ( const QStyleOptionToolBoxV2 &amp; <i>other</i> )</li>
<li><div class="fn"/><b><a href="qstyleoptiontoolboxv2.html#QStyleOptionToolBoxV2-3">QStyleOptionToolBoxV2</a></b> ( const QStyleOptionToolBox &amp; <i>other</i> )</li>
<li><div class="fn"/>QStyleOptionToolBoxV2 &amp; <b><a href="qstyleoptiontoolboxv2.html#operator-eq">operator=</a></b> ( const QStyleOptionToolBox &amp; <i>other</i> )</li>
</ul>
<ul>
<li><div class="fn"/>2 public functions inherited from <a href="qstyleoption.html#public-functions">QStyleOption</a></li>
</ul>
<a name="public-variables"></a>
<h3>Public Variables</h3>
<ul>
<li><div class="fn"/>SelectedPosition <b><a href="qstyleoptiontoolboxv2.html#selectedPosition-var">selectedPosition</a></b></li>
</ul>
<ul>
<li><div class="fn"/>2 public variables inherited from <a href="qstyleoptiontoolbox.html#public-variables">QStyleOptionToolBox</a></li>
<li><div class="fn"/>7 public variables inherited from <a href="qstyleoption.html#public-variables">QStyleOption</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QStyleOptionToolBoxV2 class is used to describe the parameters necessary for drawing a frame in Qt 4.3 or above.</p>
<p>QStyleOptionToolBoxV2 inherits <a href="qstyleoptiontoolbox.html">QStyleOptionToolBox</a> which is used for drawing the tabs in a <a href="qtoolbox.html">QToolBox</a>.</p>
<p>An instance of the QStyleOptionToolBoxV2 class has <a href="qstyleoption.html#type-varx">type</a> <a href="qstyleoption.html#OptionType-enum">SO_ToolBox</a> and <a href="qstyleoption.html#version-var">version</a> 2. The type is used internally by <a href="qstyleoption.html">QStyleOption</a>, its subclasses, and <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>() to determine the type of style option. In general you do not need to worry about this unless you want to create your own <a href="qstyleoption.html">QStyleOption</a> subclass and your own styles. The version is used by <a href="qstyleoption.html">QStyleOption</a> subclasses to implement extensions without breaking compatibility. If you use <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>(), you normally don't need to check it.</p>
<p>If you create your own <a href="qstyle.html">QStyle</a> subclass, you should handle both <a href="qstyleoptiontoolbox.html">QStyleOptionToolBox</a> and QStyleOptionToolBoxV2.</p>
<p>See also <a href="qstyleoptiontoolbox.html">QStyleOptionToolBox</a> and <a href="qstyleoption.html">QStyleOption</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<h3 class="fn"><a name="SelectedPosition-enum"></a>enum QStyleOptionToolBoxV2::SelectedPosition</h3>
<p>This enum describes the position of the selected tab. Some styles need to draw a tab differently depending on whether or not it is adjacent to the selected tab.</p>
<p><table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QStyleOptionToolBoxV2::NotAdjacent</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The tab is not adjacent to a selected tab (or is the selected tab).</td></tr>
<tr><td valign="top"><tt>QStyleOptionToolBoxV2::NextIsSelected</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The next tab (typically the tab on the right) is selected.</td></tr>
<tr><td valign="top"><tt>QStyleOptionToolBoxV2::PreviousIsSelected</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The previous tab (typically the tab on the left) is selected.</td></tr>
</table></p>
<p>See also <a href="qstyleoptiontoolboxv2.html#selectedPosition-var">selectedPosition</a>.</p>
<h3 class="fn"><a name="StyleOptionVersion-enum"></a>enum QStyleOptionToolBoxV2::StyleOptionVersion</h3>
<p>This enum holds the version of this style option</p>
<p><table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QStyleOptionToolBoxV2::Version</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">2</td></tr>
</table></p>
<h3 class="fn"><a name="TabPosition-enum"></a>enum QStyleOptionToolBoxV2::TabPosition</h3>
<p>This enum describes tab positions relative to other tabs.</p>
<p><table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QStyleOptionToolBoxV2::Beginning</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The tab is the first (i.e&#x2e;, top-most) tab in the toolbox.</td></tr>
<tr><td valign="top"><tt>QStyleOptionToolBoxV2::Middle</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The tab is placed in the middle of the toolbox.</td></tr>
<tr><td valign="top"><tt>QStyleOptionToolBoxV2::End</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The tab is placed at the bottom of the toolbox.</td></tr>
<tr><td valign="top"><tt>QStyleOptionToolBoxV2::OnlyOneTab</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">There is only one tab in the toolbox.</td></tr>
</table></p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QStyleOptionToolBoxV2"></a>QStyleOptionToolBoxV2::QStyleOptionToolBoxV2 ()</h3>
<p>Contsructs a <a href="qstyleoptiontoolboxv2.html">QStyleOptionToolBoxV2</a> object.</p>
<h3 class="fn"><a name="QStyleOptionToolBoxV2-2"></a>QStyleOptionToolBoxV2::QStyleOptionToolBoxV2 ( const QStyleOptionToolBoxV2 &amp; <i>other</i> )</h3>
<p>Constructs a <a href="qstyleoptiontoolboxv2.html">QStyleOptionToolBoxV2</a> copy of the <i>other</i> style option.</p>
<h3 class="fn"><a name="QStyleOptionToolBoxV2-3"></a>QStyleOptionToolBoxV2::QStyleOptionToolBoxV2 ( const <a href="qstyleoptiontoolbox.html">QStyleOptionToolBox</a> &amp; <i>other</i> )</h3>
<p>Constructs a <a href="qstyleoptiontoolboxv2.html">QStyleOptionToolBoxV2</a> copy of the <i>other</i> style option which can be either of the <a href="qstyleoptiontoolboxv2.html">QStyleOptionToolBoxV2</a> or <a href="qstyleoptiontoolbox.html">QStyleOptionToolBox</a> types.</p>
<p>If the <i>other</i> style option's version is 1, the new style option's <a href="qstyleoptiontoolboxv2.html#position-var">position</a> value is set to <a href="qstyleoptiontoolboxv2.html#TabPosition-enum">QStyleOptionToolBoxV2::Beginning</a> and <a href="qstyleoptiontoolboxv2.html#selectedPosition-var">selectedPosition</a> is set to <a href="qstyleoptiontoolboxv2.html#SelectedPosition-enum">QStyleOptionToolBoxV2::NotAdjacent</a>. If its version is 2, the <a href="qstyleoptiontoolboxv2.html#position-var">position</a> <a href="qstyleoptiontoolboxv2.html#selectedPosition-var">selectedPosition</a> values are simply copied to the new style option.</p>
<p>See also <a href="qstyleoption.html#version-var">version</a>.</p>
<h3 class="fn"><a name="operator-eq"></a>QStyleOptionToolBoxV2 &amp; QStyleOptionToolBoxV2::operator= ( const <a href="qstyleoptiontoolbox.html">QStyleOptionToolBox</a> &amp; <i>other</i> )</h3>
<p>Assigns the <i>other</i> style option to this style option. The <i>other</i> style option can be either of the <a href="qstyleoptiontoolboxv2.html">QStyleOptionToolBoxV2</a> or <a href="qstyleoptiontoolbox.html">QStyleOptionToolBox</a> types.</p>
<p>If the <i>other</i> style option's version is 1, this style option's <a href="qstyleoptiontoolboxv2.html#position-var">position</a> and <a href="qstyleoptiontoolboxv2.html#selectedPosition-var">selectedPosition</a> values are set to <a href="qstyleoptiontoolboxv2.html#TabPosition-enum">QStyleOptionToolBoxV2::Beginning</a> and <a href="qstyleoptiontoolboxv2.html#SelectedPosition-enum">QStyleOptionToolBoxV2::NotAdjacent</a> respectively. If its version is 2, these values are simply copied to this style option.</p>
<hr />
<h2>Member Variable Documentation</h2>
<h3 class="fn"><a name="selectedPosition-var"></a><a href="qstyleoptiontoolboxv2.html#SelectedPosition-enum">SelectedPosition</a> QStyleOptionToolBoxV2::selectedPosition</h3>
<p>This variable holds the position of the selected tab in relation to this tab.</p>
<p>The default value is <a href="qstyleoptiontoolboxv2.html#SelectedPosition-enum">NotAdjacent</a>, i.e&#x2e; the tab is not adjacent to a selected tab nor is it the selected tab.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
